package com.ssm.gbq.service;

import com.ssm.gbq.model.Doctor;
import gbq.ssm.utils.BusinessException;
import gbq.ssm.utils.PageBounds;

import java.util.List;

public interface DoctorService {
    /**
     * 分页查询
     * @param doctor
     * @param currentPage
     * @param pageSize
     * @return
     * @throws BusinessException
     */
    PageBounds<Doctor> openDoctorTable(String nameOrPhone, int currentPage, int pageSize)throws BusinessException;

    /**
     * 通过id查询
     * @param id
     * @return
     * @throws BusinessException
     */
    Doctor getDoctorById(Integer id)throws BusinessException;

    /**
     * 添加
     */
    void addDoctor(Doctor doctor)throws BusinessException;

    /**
     * 删除
     */
    void delDoctorById(List<Integer> ids)throws BusinessException;

    /**
     * 修改
     */
    void updateDoctor(Doctor doctor)throws BusinessException;

    /**
     * 通过姓名或手机号搜索
     */
    List<Doctor> searchDoctor(String nameOrPhone)throws BusinessException;

    /**
     * 通过科室ID查询医生
     * @param id
     * @return
     * @throws BusinessException
     */
    List<Doctor> getDoctorByDepartment(Integer id)throws BusinessException;

}
